import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Home from '@/components/Home'
import ArticleList from '@/components/ArticleList'
import CateMana from '@/components/CateMana'
import DataCharts from '@/components/DataCharts'
import PostArticle from '@/components/PostArticle'
import UserMana from '@/components/UserMana'
import BlogDetail from '@/components/BlogDetail'
import BlogCfg from "../components/BlogCfg";
import BlogTable from "../components/BlogTable";
import EventList from '@/components/EventList'
import TaskList from '@/components/TaskList'
import RescueManage from '@/components/RescueManage'
import SosForm from '@/components/SosForm'
import DataList from '@/components/DataList'
import GoodsManage from '@/components/GoodsManage'





Vue.use(Router)


// {
//   path: '/home',
//   name: '',
//   component: Home,
//   hidden: true
// },
export default new Router({
  routes: [
    {
      path: '/',
      name: '登录',
      hidden: true,  //排除出侧边栏数据
      component: Login
    },{
      path: '/goods',
      name: '物资',
      hidden: true,  //排除出侧边栏数据
      component: GoodsManage
    },{
      path: '/home',
      component: Home,
      name: '首页',
      redirect:'/dataList',
      children: [
        {
          path: '/dataList',
          iconCls: 'fa fa-reorder',
          name: '数据汇总面板',
          component: DataList,
          meta: {
            keepAlive: false
          }
        },{
          path: '/sosForm',
          iconCls: 'fa fa-clipboard',
          name: '紧急代填表单',
          component: SosForm,
          meta: {
            keepAlive: true
          }
        },{
          path: '/eventList',
          iconCls: 'fa fa-file-text-o',
          name: '应急请求管理',
          component: EventList,
          meta: {
            keepAlive: true
          }
        },{
          path: '/taskList',
          iconCls: 'fa fa-user-o',
          name: '救援任务管理',
          // component: UserMana,
          component:TaskList,
          meta: {
            keepAlive: true
          }
        },{
          path: '/rescueManage',
          iconCls: 'fa fa-address-book-o',
          name: '救援力量管理',
          // component: UserMana,
          component:RescueManage,
          meta: {
            keepAlive: true
          }
        }, 
        // }, {
        //   path: '/charts',
        //   iconCls: 'fa fa-bar-chart',
        //   name: '数据统计',
        //   component: DataCharts
        // }
      ]
    }
    // , {
    //   path: '/home',
    //   component: Home,
    //   name: '应急任务管理',
    //   children: [
        
    //   ]
    // }, {
    //   path: '/home',
    //   component: Home,
    //   name: '数据历史汇总',
    //   children: [
       
    //   ]
    // }, {
    //   path: '/home',
    //   component: Home,
    //   name: '数据统计',
    //   iconCls: 'fa fa-bar-chart',
    //   children: [
       
    //   ]
    // }
  ]
})



// {
    //   path: '/home',
    //   component: Home,
    //   name: '文章管理',
    //   iconCls: 'fa fa-file-text-o', //图标
    //   children: [
    //     {
    //       path: '/articleList',
    //       name: '文章列表',
    //       component: ArticleList,
    //       meta: {
    //         keepAlive: true
    //       }
    //     }, {
    //       path: '/postArticle',
    //       name: '发表文章',
    //       component: PostArticle,
    //       meta: {
    //         keepAlive: false
    //       }
    //     }, {
    //       path: '/blogDetail',
    //       name: '博客详情',
    //       component: BlogDetail,
    //       hidden: true,   //还未实现
    //       meta: {
    //         keepAlive: false
    //       }
    //     }, {
    //       path: '/editBlog',
    //       name: '编辑博客',
    //       component: PostArticle,
    //       hidden: true,  //还未实现
    //       meta: {
    //         keepAlive: false
    //       }
    //     }
    //   ]
    // },